var WEB_CONTEXT_PATH = "/WMS";
var APP_PATH = WEB_CONTEXT_PATH + "/app";

// 重写alert实现
var walert = window.alert;
// window.alert = showAlert;
function showAlert(Str) {
	
	if (!Str) {
		
		Str = "";
	}
	
	Ext.MessageBox.alert('爱翼提示', Str);
}

// 重写confirm实现
var wconfirm = window.confirm;
// window.confirm = showConfirm;
function showConfirm(Str) {
	
	if (!Str) {
		
		Str = "";
	}
	
	Ext.MessageBox.confirm('请确认', Str, function(btn) {
		
		if (btn && btn == 'yes') {
			
			return true;
		}
		else {
			
			return false;
		}
	});
}

// 表单提交
function submitForm(as_Action) {
	document.all.form_Post.action = as_Action;
	document.all.form_Post.submit();
}
function submitForm(as_Action, isVal) {
	document.all.form_Post.action = as_Action;
	document.all.form_Post.submit();
}

// 创建A标签
function createA(label, action) {
	
	return '<a href="javascript: void(0);" onclick="' + action + '">[' + label + ']</a>&nbsp;&nbsp;';
}
function createA(label, funName, val) {
	
	return '<a href="javascript: void(0);" onclick="' + funName + '(\'' + val + '\');">[' + label + ']</a>&nbsp;&nbsp;';
}